<template>
  <div class="app-container">
    <div class="studentSituation_info_wrap">
      <div class="studentSituation-name">学员参与情况统计</div>
      <div class="studentSituation-title">
        <div class="studentSituation-title_li" style="margin-right: 24px;background-color: #EFF6FF;">
          <div class="studentSituation-title_li_label" style="color: #2563EB;">总学员数</div>
          <div class="studentSituation-title_li_value" style="color: #2563EB;"><span class="studentSituation-title_li_value_main">125</span>人</div>
        </div>
        <div class="studentSituation-title_li" style="background-color: #F0FDF4;">
          <div class="studentSituation-title_li_label" style="color: #16A34A;">签到率</div>
          <div class="studentSituation-title_li_value"><span class="studentSituation-title_li_value_main" style="color: #15803D">98.4%</span></div>
        </div>
      </div>
      <div class="studentSituation-content">
        <div class="studentSituation-content_title">学员列表</div>
        <div class="studentSituation-content_table">
          <el-table v-loading="loading" :data="studentList"  class="teacher_list">
            <el-table-column label="学员姓名" align="center" prop="studentName" />
            <el-table-column label="所属学校" align="center" prop="teacherUnit" />
            <el-table-column label="签到率" align="center" prop="signIn" />
            <el-table-column label="在线学习进度" align="center" prop="learningProgress" />
            <el-table-column label="作业完成率" align="center" prop="learningComplete" />
            <el-table-column label="满意度填写率" align="center" prop="SatisfactionLevel" />
            <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
              <template slot-scope="scope">
                <el-button
                  size="mini"
                  type="text"
                  @click="handleDetail(scope.row)"
                  v-hasPermi="['classai:training:edit']"
                >
                  <img src="@/assets/images/teacher_detail.png" style="width:12px;height:16px;" alt="">
                </el-button>
              </template>
            </el-table-column>
          </el-table>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { addTeacher } from "@/api/classai/teacher";
import {addTraining, getTraining, updateTraining} from "@/api/classai/training";

export default {
  name: "StudentSituation",
  dicts: ['px_type'],
  data() {
    return {
      // 表单参数
      form: {},
      loading:false,
      studentList:[
        {
          id:'1',
          studentName:'里斯',
          teacherUnit:'测试学校',
          signIn:'98.8%',
          learningProgress:'66%',
          learningComplete:'55%',
          SatisfactionLevel:'99%'
        }
      ],
      // 表单校验
      rules: {
        trainingTitle: [
          { required: true, message: "培训名称不能为空", trigger: "blur" }
        ],
      }
    };
  },
  created(){
    this.getList()
  },
  methods: {
    getList(){
      // let id = this.$route.query.id
      // getTraining(id).then(response => {
      //   this.form = response.data;
      // });
    },
    handleDetail(row){
      this.$router.push(`/pxmanage/studentSituationDetails?id=${row.id}`)
    },

  }
};
</script>
<style lang="scss" scoped>
.app-container{
  background: #f3f4f6;
  flex: 1;
  padding: 24px;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
}
.studentSituation_info_wrap {
  flex: 1;
  overflow: auto;
  border-radius: 6px;
  background: #fff;
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0);
  box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
  padding: 24px;
  display: flex;
  flex-direction: column;
  .studentSituation-name{
    font-size: 18px;
    font-weight: 500;
    line-height: 28px;
    color: #1F2937;
    margin-bottom: 24px;
  }
  .studentSituation-title{
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    .studentSituation-title_li{
      flex: 1;
      padding: 16px;
      box-sizing: border-box;
      border-radius: 8px;
      .studentSituation-title_li_label{
        font-size: 14px;
        line-height: 20px;
        margin-bottom: 5px;
      }
      .studentSituation-title_li_value_main{
        font-size: 24px;
        font-weight: 600;
        line-height: 32px;
        color: #1D4ED8;
      }
    }
  }
  .studentSituation-content{
    flex: 1;
    padding: 24px;
    border-radius: 8px;
    background: #FFFFFF;
    box-sizing: border-box;
    border: 1px solid #E5E7EB;
    .studentSituation-content_title{
      font-size: 16px;
      font-weight: 500;
      line-height: 24px;
      color: #374151;
      margin-bottom: 16px;
    }
  }
}

</style>
